package com.headwind.logistics.operation.controller;

import com.headwind.logistics.common.util.LayuiUtil;
import com.headwind.logistics.operation.dto.FetchMoneyPaymentTransportUserDto;
import com.headwind.logistics.operation.service.inter.WithdrawMoenyRechargeBizInter;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author 周鑫
 * @Date 2020/7/24 15:19
 * @Version 1.0
 * @DESCRIPTION 余额提现记录控制层
 */
@Controller
public class WithdrawMoneyRechargeController {

    @Resource
    WithdrawMoenyRechargeBizInter withdrawMoenyRechargeBizInter;

    /**
     * 查询所有和分页
     * @param page 页码
     * @param limit 行数
     * @return 转json工具类
     */
    @GetMapping("/admin/withdrawrecharge/query")
    @ResponseBody
    public LayuiUtil queryWithdrawMoneyRechargeController(Integer page,Integer limit){

        List<FetchMoneyPaymentTransportUserDto> fetchMoneyPaymentTransportUserDto =withdrawMoenyRechargeBizInter.queryAlltoRechargeBizInter(page,limit);
        return LayuiUtil.data(withdrawMoenyRechargeBizInter.queryAlltoRechargeBizInter(null,null).size(),fetchMoneyPaymentTransportUserDto);
    }
}
